#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include "scull_common.h"

#define BUF_LEN 20

int main()
{
    int fd, quantum = 0;

    fd = open("/dev/scull0", O_WRONLY);
    if (fd < 0) {
        perror("open failed");
        exit(1);
    }

    ioctl(fd, SCULL_IOCGQUANTUM, &quantum);
    printf("quantum=%d\n", quantum);

    quantum = 10;
    
    ioctl(fd, SCULL_IOCTQUANTUM, quantum);

    close(fd);
    exit(0);
}

